

/**
 * 
 * @param {Array} menuList 用户的菜单信息
 * @param {Array} allRoutes 用户的完整动态路由表
 */



let recursionRoutes = (menuList,allRoutes)=>{
    let userRoutes = []
    menuList.length>0 && menuList.forEach(item => {
        allRoutes.forEach(items => {
            if(item.title===items.meta.default.meta.title){
                if(item.children?.length>0 && item.children){
                    items.children = recursionRoutes(item.children,items.children)
                }
                userRoutes.push(items)
            }
        })
    })
    return userRoutes
}
export default recursionRoutes